﻿<%@ Page Title="" Language="C#" MasterPageFile="~/CMS/CMS.Master" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="Solution.CMS._default" %>
<%@ Register TagPrefix="dx" Namespace="DevExpress.Web.ASPxGridView" Assembly="DevExpress.Web.ASPxGridView.v12.1, Version=12.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" %>
<%@ Register assembly="DevExpress.Web.ASPxEditors.v12.1, Version=12.1.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="FeaturedContent" runat="server">
</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <a href='categoryeditor.aspx?act=<%# Solution.Utilities.PageAction.New%>'>Add New Category</a>
    <dx:ASPxGridView ID="grdMasterCategory" runat="server" Theme="Default" Width="1000px">
        <Columns>
            <dx:GridViewDataColumn FieldName="Title" Caption="Title" VisibleIndex="1" />            
            <dx:GridViewDataColumn FieldName="Thumb" Caption="Thumbnail" VisibleIndex="2" />
            <dx:GridViewDataColumn FieldName="Parent.Title"  Caption="Parent" VisibleIndex="3" />
        </Columns>
        <Templates>
            <DataRow>
                <div style="padding: 5px">
                    <table class="templateTable">
                        <tr>
                            <td rowspan="2" style="width: 470px">
                                <img src='<%# Eval("Thumb") %>'/>
                            </td>
                            <td>
                                Title
                            </td>
                            <td class="value">
                                <dx:ASPxLabel runat="server" Text='<%# Eval("Title") %>' />
                            </td>
                            <td>
                                <a href='categoryeditor.aspx?act=<%# Solution.Utilities.PageAction.Edit%>&id=<%# Eval("Id") %>'>Edit</a>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                Parent
                            </td>
                            <td class="value">
                                <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text='<%# Eval("Parent.Title") %>' />
                            </td>
                            <td>
                                <a href='default.aspx?act=<%# Solution.Utilities.PageAction.Delete%>&id=<%# Eval("Id") %>'>Delete</a>
                            </td>
                        </tr>
                    </table>
                </div>
            </DataRow>
        </Templates>
        <SettingsPager Position="TopAndBottom" />
        <Settings EnableFilterControlPopupMenuScrolling="True" ShowColumnHeaders="False" />
        <SettingsPopup>
            <EditForm Width="600" />
        </SettingsPopup>
    </dx:ASPxGridView>
</asp:Content>

<asp:Content ID="Content4" ContentPlaceHolderID="FooterContent" runat="server">
</asp:Content>
